package main

import "fmt"

func foo(ch chan int) {
	ch <- 100
}

func main() {
	// 引用类型易错
	var ch = make(chan int, 3)
	ch <- 10
	ch <- 20
	var ch2 = ch
	fmt.Println(<-ch2)
	fmt.Println(<-ch)
	var ch3 = make(chan int, 3)
	foo(ch3)
	fmt.Println(<-ch3)
}
